
import server from "./ajax";

type pageProps = {
  errno: number;
  data?: dataType;
  msg?: string;
};
type dataType = {
  id: string;
  title: string;
  desc?: string;
  js?: string;
  css?: string;
  isPublished: boolean;
  isDeleted: boolean;
  componentList: any[];
};

export const getQuestionById = async (id: string): Promise<pageProps> => {
  return await server.get(`/api/question/${id}`);
};
